<div class="crumbs">
  <h3>爆款管理</h3>
  <p><a ui-sref="main.material-list" >主材管理</a> > <a ui-sref="main.material-list" >主材列表</a> > 门店列表</p>
</div>

<div class="content-box">
  <div class="form-inline form-group  "  >
    <button type="button" class="btn btn-primary btn-sm mb10 input-sm ml10 float-right " ng-click="addGoodsInfoDialog()">新增爆款</button>
  </div>

  <table class=" table   table-hover table-condensed  table-striped text-center m  ">
    <thead style="background:#8A8BC4; color: #fff">
    <tr>
      <td>ID</td>
      <td>图片</td>
      <td>url地址</td>
      <td>状态</td>
      <td>操作</td>
    </tr>
    </thead>


    <tbody>
    <tr ng-repeat="g in grid.result">
      <td>{{g.productId  }}</td>
      <td><img ng-src="{{g.productImg}}&imageView2/2/h/30/"/></td>
      <td>{{g.productUrl }}</td>
      <td>{{g.available?'启用':'禁用'}}</td>
      <td>
        <button  class="btn btn-danger btn-xs " ng-click=del(g.productId)>删除</button>
        <button  class="btn btn-primary btn-xs " ng-click=addGoodsInfoDialog(g)>修改</button>
        <button  class="btn btn-warning btn-xs " ng-click=setTop(g.productId)>置顶</button>
      </td>
    </tr>
    <tr ng-if="!grid.result"><td colspan=5 class="f12 c-999 " >没有相关数据!</td></tr>
    </tbody>
  </table>



</div>


<!--dialog上传图文模块-->
<div class="modal fade upInfoDialog  create-dialog-box">
  <div class="modal-dialog " style="width: 700px">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" >新增爆款</h4>
      </div>

      <div class="modal-body"  >
        <div class="dialog-content ml20 ">
          <dl class="  form-inline form-group" >

            <dd>
              <span>上传图片：</span>
              <div class="inline-block"><button type="button"  class="btn btn-info " id="upPhotosBtn"> 上传图片 <i></i></button>
                <i class=" f12 c-999 ml10">({{tagsBaseText.common}})</i>
                <div class="img-show-box create-dialog"></div> <input type="hidden"  ng-model="createUpInfo.productImg"  />
              </div>
            </dd>

            <dd><span>商品url：</span>
              <input class="form-control " ng-model="createUpInfo.productUrl"   size="55"   ng-maxlength="50" maxlength="50" placeholder="url"/>
             </dd>

            <p class="text-center c-red f12 "><em ng-bind="createUpInfo.errorMsg"></em></p>
          </dl>

        </div>
      </div>
      <div class="modal-footer" >
        <button type="button" class="btn btn-primary "  ng-click="createUpInfoSumbit(createUpInfo)" >确定</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->


<div ng-include="'/templates/partial/show-img.html'"></div>